

def insertion_sort(numbers):

    # Note, be careful to not use "list" as a variable. It is the name of a python function.
    # run through the length of the list 

    for i,value in enumerate(numbers):

       while i > 0: # start at the second element in the list

            # if the number to the left is bigger than value, interchange the two elements
            # remember that the list to the left of index is sorted
           if value < numbers[i-1]:

               numbers[i] = numbers[i-1]  
               numbers[i-1] = value
               i -= 1

           else:
               break # we don't need to interchange the elements, they are already in place




